﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ReportSystem_XY.Utility
{
    public static class ConfigHelper
    {
        public static string GetValueItem(string keyName)
        {
            //返回配置文件中键为keyName的项的值
            return ConfigurationManager.AppSettings[keyName];
        }
        public static string GetConnectString(string keyName)
        {
            //返回配置文件中的连接字符串
            return ConfigurationManager.ConnectionStrings[keyName].ConnectionString;
        }
    }
}
